package com.ruoyi.agencyfund.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.agencyfund.mapper.AgencyFundMapper;
import com.ruoyi.agencyfund.domain.AgencyFund;
import com.ruoyi.agencyfund.service.IAgencyFundService;

/**
 * 运单代收款业务Service业务层处理
 *
 * @author dxw
 * @date 2022-05-04
 */
@Service
public class AgencyFundServiceImpl implements IAgencyFundService
{
    @Autowired
    private AgencyFundMapper agencyFundMapper;

    /**
     * 查询运单代收款业务
     *
     * @param id 运单代收款业务主键
     * @return 运单代收款业务
     */
    @Override
    public AgencyFund selectAgencyFundById(Long id)
    {
        return agencyFundMapper.selectAgencyFundById(id);
    }

    /**
     * 查询运单代收款业务列表
     *
     * @param agencyFund 运单代收款业务
     * @return 运单代收款业务
     */
    @Override
    public List<AgencyFund> selectAgencyFundList(AgencyFund agencyFund)
    {   agencyFundMapper.add(agencyFund);
        return agencyFundMapper.selectAgencyFundList(agencyFund);
    }

    /**
     * 新增运单代收款业务
     *
     * @param agencyFund 运单代收款业务
     * @return 结果
     */
    @Override
    public int insertAgencyFund(AgencyFund agencyFund)
    {
        return agencyFundMapper.insertAgencyFund(agencyFund);
    }

    /**
     * 修改运单代收款业务
     *
     * @param agencyFund 运单代收款业务
     * @return 结果
     */
    @Override
    public int updateAgencyFund(AgencyFund agencyFund)
    {
        return agencyFundMapper.updateAgencyFund(agencyFund);
    }

    /**
     * 批量删除运单代收款业务
     *
     * @param ids 需要删除的运单代收款业务主键
     * @return 结果
     */
    @Override
    public int deleteAgencyFundByIds(Long[] ids)
    {
        return agencyFundMapper.deleteAgencyFundByIds(ids);
    }

    /**
     * 删除运单代收款业务信息
     *
     * @param id 运单代收款业务主键
     * @return 结果
     */
    @Override
    public int deleteAgencyFundById(Long id)
    {
        return agencyFundMapper.deleteAgencyFundById(id);
    }

    @Override
    public int add(AgencyFund agencyFund) {
        return agencyFundMapper.add(agencyFund);
    }

    @Override
    public List<AgencyFund> selectHistory(AgencyFund agencyFund) {
        return agencyFundMapper.selectHistory(agencyFund);
    }
}
